from fastapi import FastAPI
from api import router
from itemController import ItemController


if __name__ == "__main__":
    import uvicorn
    app = FastAPI()
    # 初始化控制器
    itemController = ItemController()
    # 注册路由
    itemController.register_routes()
    
    # 注册路由
    app.include_router(itemController.get_router())
    # 启动服务器
    uvicorn.run(app, host="localhost", port=8080)